<?php
    
    
    function employeerequestGET($request) {
    	
		$employee = new Employee();
		$employee->setEmployeeId($request->getArgs['id']);
			
		$requestBusiness = BusinessFactory::factory('RequestBusiness');
		$result = $requestBusiness->selectRequestsByEmployeeId($employee->getEmployeeId());
		
		if ($result != NULL) {
		
			if(is_array($result) && sizeof($result) > 0) {
					
				header("Status: 200 Success", true, 200);
				
			} else {
				header("Status: 404 Not Found", true, 404);
			} 
		}
		else {
			header("Status: 500 Internal Server Error", true, 500);
		} 
		
		return $result;
		
    }
    
?>